﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="htmlOutLook.aspx.cs" Inherits="WebContratos.htmlOutLook" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxHtmlEditor.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxHtmlEditor" TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Página sin título</title>
    
     <script type="text/javascript">
    // <![CDATA[
        function OnCommandExecute(s, e) {
            var value = e.parameter;
            switch (e.commandName) {
                case "InsertSmiley":
                    InsertSmiley(value);
                    break;
                case "InsertSpecialSymbol":
                    InsertSpecialSymbol(value);
                    break;
            }
        }
        function InsertSmiley(value) {
            var selection = HtmlEditor.GetSelection();
            var valueInfo = value.split("#");
            selection.SetHtml("<img style='margin-bottom:-2px;' src='../Content/Smilies/" + valueInfo[0] + ".png' alt='" + valueInfo[2] + "' title='" + valueInfo[1] + "' />");
        }
        function InsertSpecialSymbol(symbol) {
            var selection = HtmlEditor.GetSelection();
            selection.SetHtml(symbol);
        }
        
        function abrirPopup(c_campo1, c_campo2, valor)
		{
            
           
		  campo1 = document.getElementById(c_campo1).value;
		  campo2 = document.getElementById(c_campo2).value;
		 
		  nomCampo1 = c_campo1;		  
		  nomCampo2 = c_campo2;
		  
		  var longiBusc = 0;
		  var longiBusc1 = 0;
		  
		  if(valor==1)
		  {
		    obtieneListaValores(campo1, campo2, 'consultaEmpleados');			
		  }
		}
        
        var obj;
              function getXMLHTTPRequest() 
              {
                 var xRequest=null;
                if (window.XMLHttpRequest) {
                xRequest=new XMLHttpRequest();
                }else if (typeof ActiveXObject != "undefined"){
                  xRequest=new ActiveXObject("Microsoft.XMLHTTP");
                }
                  return xRequest;
                }
            function obtieneListaValores(campo1, campo2, campo3)
            {
                obj=getXMLHTTPRequest();
                if(obj!=null)
                {
                    obj.onreadystatechange = ProcessResponse;
                    obj.open("GET", "Srvlets/ProcessedPage.aspx?campo1="+campo1+"&campo2="+campo2+"&campo3="+campo3,  true);
                    obj.send(null);         
                }
                return false;
            }

            function ProcessResponse()
            {
                var basePath = "";
                
                if(obj.readyState == 4)
                {
                    if(obj.status == 200)
                    {
                        var retval=obj.responseText;  
                        
                        window.open(basePath+'General/encontrarDatos.aspx?exP='+navigator.appName.indexOf("Microsoft")+'&nomCampo1='+nomCampo1+'&nomCampo2='+nomCampo2+'&tipo=1','Consulta','width=590px,height=300px');

                    }
                    else
                    {
                        alert("Error retrieving data!" );
                    }   
                }
            }
            
    // ]]> 
    </script>



    <style type="text/css">
        .style1
        {
            width: 245px;
        }
        </style>



</head>
<body bgcolor="#D6E8FF">
    <form id="form1" runat="server">
    <div>
       <table style="width:100%"  summary="Submitted table designs" cellSpacing=0 cols=0 cellPadding=0>
			    <tr>
				<td style="width:1%"  align="left">
					<div style="height: 35px; font-weight: bold; font-size: 18px; color: #6699cc; font-family: Tahoma;">
						  <img src="images/ico_lrg_112.gif" 
							   loop="0"/>
					</div>
				 </td>
				 <td align="left" valign="bottom" style="width:80%">
                     <asp:Label ID="lblEmail" runat="server" 
                         style="font-weight: 700; font-family: Arial, Helvetica, sans-serif; font-size: medium" 
                         Text="Email"></asp:Label>
                        </td>				
				 </tr>
   </table>

<table bgcolor="#EAF3FF"  
                       style=" width: 100%; height:100%; 
                        	  font-size: 11px; font-family: Tahoma; border-right: #b0c2d0 1px solid;
            				  border-top: #b0c2d0 1px solid; border-left: #b0c2d0 1px solid; border-bottom:#b0c2d0 1px solid; " id="idToolbar">
                  <tr style="height: 100%; width:100%">
                    <td
                        nowrap="nowrap" style="padding-right: 2px; padding-left: 5px; height: 30px;">
						<table width="80%" height="100%" 
                            style="border-right: #b0c2d0 1px solid;
            				  border-top: #b0c2d0 1px solid; border-left: #b0c2d0 1px solid; border-bottom:#b0c2d0 1px solid; ">
						                      <tr>
                        <td width="168"><strong><span class="style6"><asp:Label ID="lblEmailDe" 
                                runat="server" Text="atipan@electricaguayaquil.gob.ec"></asp:Label></span></strong></td>
                        <td width="205">     
                      &nbsp;</td>
                        <td>&nbsp;</td>
                        <td style="text-align: right"> 
                        <asp:LinkButton ID="LinkButton2" runat="server" Visible="False">Mostrar CC: y CCO:</asp:LinkButton>
                                                  </td>
						<td width="38" rowspan="9">
           <dx:ASPxButton ID="btnEnviar" runat="server" Text="Enviar" onclick="btnEnviar_Click">
            </dx:ASPxButton>
                                                  </td>
                      </tr>
                                              <tr>
                                                <td><strong><span class="style6">
                     <dx:ASPxButton ID="btnPara" runat="server" Text="Para:" AutoPostBack="False" CausesValidation="False">
                         <ClientSideEvents Click="function(s, e) {
	abrirPopup('lblMessage','txtParaEmail_I',1);return false;
}" />
                     </dx:ASPxButton>
                                                    <asp:Label ID="lblMessage" runat="server"></asp:Label>
                                                    </span></strong></td>
                                                <td colspan="3">&nbsp;<strong><span class="style6"><dx:ASPxTextBox 
                                                        ID="txtParaEmail" runat="server" Width="100%">
                     </dx:ASPxTextBox>
                                                    </span></strong> 
												</td>
                                              </tr>
                         
                                              <tr>
                                                <td>
                     <asp:Label ID="Label2" runat="server" Text="Asunto:"></asp:Label>
                                                  </td>
                                                <td colspan="3">
                     <dx:ASPxTextBox ID="txtAsuntoEmail" runat="server" Width="100%">
                     </dx:ASPxTextBox>
												</td>
                                              </tr>
                         
                    </table>
                    
                    </td>
                    </tr>
        </table>
    
        <table style="width:100%" cellpadding="0" cellspacing="0">           
          <tr style="width:100%">          
            <td>
        <dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" Width="100%">
<SettingsImageSelector>
<CommonSettings AllowedFileExtensions=".jpe, .jpeg, .jpg, .gif, .png"></CommonSettings>
</SettingsImageSelector>

<SettingsImageUpload>
<ValidationSettings AllowedFileExtensions=".jpe, .jpeg, .jpg, .gif, .png"></ValidationSettings>
</SettingsImageUpload>
        </dx:ASPxHtmlEditor>
        </td>
        </tr>
        <tr>
           <td style="text-align: center">
               &nbsp;</td>         
              
        </tr>
        </table>
    </div>
    </form>
</body>
</html>
